package ink.xiaobaibai.common;

import lombok.Data;

import java.util.List;

/**
 * @description: 分页响应
 * @author: 小白白
 * @create: 2021-05-23
 **/

@Data
public class PageInfo<T> {

    public PageInfo(List<T> data, int count, int pageSize) {
        this.data = data;
        this.count = count;
        this.allPageNum = (int) Math.ceil((double) count / (double) pageSize);
    }

    private List<T> data;

    private int count;

    private int allPageNum;

}
